<template>
	<view class="my-search" @click="goToSearchDetail">
		<input
			type="text"
			placeholder="搜索书籍/作者"
			class="inp"
		/>
		<image src="@/static/search.png" class="img" />
	</view>
</template>

<script>
	export default {
		name: "MySearch",
		data() {
			return {};
		},
		methods: {
			goToSearchDetail() {
				// 使用 uni.navigateTo 进行页面跳转
				uni.navigateTo({
					url: '/pages/searchDetail/searchDetail'
				});
			}
		}
	}
</script>

<style lang="scss">
	.my-search {
		width: 100%;
		margin: 20rpx 0 10rpx 0;
		position: relative;
		.inp {
			padding-left: 80rpx;
			padding-top: 20rpx;
			padding-bottom: 20rpx;
			border: 2rpx solid #cccccc;
			border-radius: 40rpx;
			box-shadow: 6rpx 6rpx 6rpx #cccccc;
		}
		.img {
			width: 40rpx;
			height: 40rpx;
			position: absolute;
			top: 30%;
			left: 26rpx;
		}
	}
</style>
